<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/empty_page.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:52 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>{:C('WEB_TITLE')}</title>
    <meta name="keywords" content="{:C('WEB_KEYWORDS')}">
    <meta name="description" content="{:C('WEB_DESC')}">

    <link rel="shortcut icon" href="__PUBLIC__/favicon.ico">
    <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">

    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg" style="background-color: white;">
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>文章修改</h2>
    </div>
</div>

<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <form class="form-horizontal m-t" id="signupForm" action="" method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文章标题：</label>
                    <div class="col-sm-5">
                        <input id="title" name="title" class="form-control" type="text" value="{$rs.title}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">文章内容：</label>
                    <div class="col-sm-5">
                        <!--<input id="summernote" name="rows" class="summernote" type="text" value="" />-->
                        <div class="summernote" id="summernote">{$rs.content}</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">文章缩略图：</label>
                    <div class="col-sm-5">
                        <input type="file" name="info_photo" value="" id="info_photo" onchange='PreviewImage(this)' />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">缩略图显示：</label>
                    <div class="col-sm-5">
                        <if condition="$rs.image eq null">
                            <div id="photo_info" class="photo_info"></div>
                            <else/>
                            <div id="photo_info" class="photo_info"><img src="/Public{$rs.image}"></div>
                        </if>
                    </div>
                </div>
                <input type="hidden" name="content" value="" id="content" />

                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-3">
                        <button class="btn btn-primary" type="submit" onclick="sub()">提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/js/plugins/summernote/summernote.min.js"></script>
<script src="__PUBLIC__/js/plugins/summernote/summernote-zh-CN.js"></script>
<script>
    $(document).ready(function(){$(".summernote").summernote({lang:"zh-CN"})});var edit=function(){$("#eg").addClass("no-padding");$(".click2edit").summernote({lang:"zh-CN",focus:true})};var save=function(){$("#eg").removeClass("no-padding");var aHTML=$(".click2edit").code();$(".click2edit").destroy()};
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<script>
    function sub() {
        var title = $("#title").val();
        var rows = $('.summernote').code();
        var titp =$('.photo_info img').attr('src');
        if (titp == "") {
            alert("请选择一个图片文件，再点击上传。");
            return;
        }
        $("#content").val(rows);
        $("#signupForm").submit();
    }
    //上传图片立即预览
    function PreviewImage(imgFile) {
        var filextension = imgFile.value.substring(imgFile.value
                .lastIndexOf("."), imgFile.value.length);
        filextension = filextension.toLowerCase();
        if ((filextension != '.jpg') && (filextension != '.gif')
                && (filextension != '.jpeg') && (filextension != '.png')
                && (filextension != '.bmp')) {
            alert("对不起，系统仅支持标准格式的照片，请您调整格式后重新上传，谢谢 !");
            imgFile.focus();
        } else {
            var path;
            if (document.all)//IE
            {
                imgFile.select();
                path = document.selection.createRange().text;
                document.getElementById("photo_info").innerHTML = "";
                document.getElementById("photo_info").style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='scale',src=\""
                        + path + "\")";//使用滤镜效果
            } else//FF
            {
                path = window.URL.createObjectURL(imgFile.files[0]);// FF 7.0以上
                //path = imgFile.files[0].getAsDataURL();// FF 3.0
                document.getElementById("photo_info").innerHTML = "<img id='img1' width='120px' height='100px' src='"+path+"'/>";
                //document.getElementById("img1").src = path;
            }
        }
    }
</script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/empty_page.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:52 GMT -->
</html>
